import type { App } from "vue";

// import FlexNode from './FlexNode.vue'
// import FlexRoot from './FlexRoot.vue'
import Yoga from "yoga-layout-prebuilt";
      // 创建节点
const root = Yoga.Node.create();
root.setWidth(500);
root.setHeight(500);
console.log("Yoga 11加载完成，组件已注册");
const child = Yoga.Node.create();
child.setWidth(100);
child.setHeight(100);
root.insertChild(child, 0);

// 布局计算
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);

console.log(root.getComputedLayout());
console.log(child.getComputedLayout());
console.log("Yoga 加载完成，组件已注册");
// export default {
//    install(app: App) {
//     try {

//     } catch (error) {
//       console.error("Yoga 加载失败:", error);
//     }
//   }
// };

// export { FlexNode, FlexRoot };
